package cn.lsnu.modules.watch.service;

import cn.lsnu.common.interfacetools.interfaceentity.Page;
import cn.lsnu.common.interfacetools.interfaceservice.BaseService;
import cn.lsnu.modules.watch.entity.GaspaymentEntity;
import cn.lsnu.modules.watch.mapper.RecordWatchMapper;
import cn.lsnu.utils.Guuid;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Service
public class RecordWatchService extends BaseService<GaspaymentEntity,RecordWatchMapper> {

    @Override
    public void save(GaspaymentEntity entity) throws Exception {
        entity.setReadDate(new Date());
        super.save(entity);
    }

    @Override
    public GaspaymentEntity get(String key) throws Exception {
        return super.get(key);
    }

    @Override
    public GaspaymentEntity getEntity(GaspaymentEntity entity) throws Exception {
        return super.getEntity(entity);
    }

    @Override
    public List<GaspaymentEntity> findList(GaspaymentEntity entity) throws Exception {
        return super.findList(entity);
    }

    @Override
    public Page<GaspaymentEntity> findPage(GaspaymentEntity entity) throws Exception {
        return super.findPage(entity);
    }

    @Override
    public void delete(GaspaymentEntity entity) throws Exception {
        super.delete(entity);
    }

    @Override
    public void update(GaspaymentEntity entity) throws Exception {
        entity.setReadDate(new Date());
        super.update(entity);
    }
}
